package cc.yiueil;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping(value = "/view")
public class ViewController {
    @RequestMapping(value = "to/result")
    public String toResult() {
        return "result";
    }

    @RequestMapping(value = "to/error")
    public String toError(@RequestParam(value = "msg") String msg, @RequestParam(value = "isOk", defaultValue = "false") String isOk) {
        System.out.println("isOk = " + isOk);
        System.out.println("msg = " + msg);
        return "error";
    }
}
